<div class="clearfix">
	<?php echo $form->labelEx($model,'body'); ?>
	<div class="input">
		<?php $this->widget('ext.markitup.MarkItUp',array(
			'model'=>$model,
			'attribute'=>'body',
			'set'=>'bbcode',
			'settings'=>array(
				'nameSpace'=>'comment-body',
				'resizeHandle'=>false,
				//'previewParserPath'=>Yii::app()->createUrl('comment/parse'),
				'markupSet'=>array(
					array('name'=>Yii::t('editor','Bold'),'key'=>'B','openWith'=>'[b]','closeWith'=>'[/b]'),
					array('name'=>Yii::t('editor','Italic'),'key'=>'I','openWith'=>'[i]','closeWith'=>'[/i]'),
					array('name'=>Yii::t('editor','Underline'),'key'=>'U','openWith'=>'[u]','closeWith'=>'[/u]'),
					array('separator'=>'---------------'),
					array('name'=>Yii::t('editor','Image'),'replaceWith'=>'[img][!['.Yii::t('editor','Image URL').']!][/img]'),
					array('name'=>Yii::t('editor','Link'),'openWith'=>'[url=[!['.Yii::t('editor','Link URL').']!]]','closeWith'=>'[/url]','placeHolder'=>Yii::t('editor','Link text')),
					array('separator'=>'---------------'),
					array('name'=>Yii::t('editor','Size'),'key'=>'S','openWith'=>'[size=[![Text size]!]','closeWith'=>'[/size]','dropMenu'=>array(
						array('name'=>Yii::t('editor','Big'),'openWith'=>'[size=200]','closeWith'=>'[/size]'),
						array('name'=>Yii::t('editor','Normal'),'openWith'=>'[size=100]','closeWith'=>'[/size]'),
						array('name'=>Yii::t('editor','Small'),'openWith'=>'[size=50]','closeWith'=>'[/size]'),
					)),
					array('separator'=>'---------------'),
					array('name'=>Yii::t('editor','Bulleted list'),'openWith'=>'[list]\n','closeWith'=>'\n[/list]'),
					array('name'=>Yii::t('editor','Numeric list'),'openWith'=>'[list=[![Starting number]!]\n','closeWith'=>'\n[/list]'),
					array('name'=>Yii::t('editor','List item'),'openWith'=>'[*] '),
					array('separator'=>'---------------'),
					array('name'=>Yii::t('editor','Quote'),'openWith'=>'[quote]','closeWith'=>'[/quote]'),
					array('name'=>Yii::t('editor','Code'),'openWith'=>'[code]','closeWith'=>'[/code]'),
					array('separator'=>'---------------'),
					array('name'=>Yii::t('editor','Clean'),'className'=>'clean','replaceWith'=>'function(markitup) {
						return markitup.selection.replace(/\[(.*?)\]/g, "");
					}'),
					array('name'=>Yii::t('editor','Preview'),'className'=>'preview','call'=>'preview'),
				),
			),
			'htmlOptions'=>array('class'=>'body xxlarge','rows'=>6),
		)); ?>
		<?php echo $form->error($model,'body'); ?>

		<div id="emoticons">
			<?php echo CHtml::link(CHtml::image(Yii::app()->baseUrl.'/images/emoticons/emotion-happy.png',Yii::t('emoticon','Happy')),'',
					array('class'=>'twipsify','title'=>':)','data-emoticon'=>':)')); ?>
			<?php echo CHtml::link(CHtml::image(Yii::app()->baseUrl.'/images/emoticons/emotion-unhappy.png',Yii::t('emoticon','Unhappy')),'',
					array('class'=>'twipsify','title'=>':(','data-emoticon'=>':(')); ?>
			<?php echo CHtml::link(CHtml::image(Yii::app()->baseUrl.'/images/emoticons/emotion-wink.png',Yii::t('emoticon','Wink')),'',
					array('class'=>'twipsify','title'=>';)','data-emoticon'=>';)')); ?>
			<?php echo CHtml::link(CHtml::image(Yii::app()->baseUrl.'/images/emoticons/emotion-smile.png',Yii::t('emoticon','Grin')),'',
					array('class'=>'twipsify','title'=>':D','data-emoticon'=>':D')); ?>
			<?php echo CHtml::link(CHtml::image(Yii::app()->baseUrl.'/images/emoticons/emotion-surprised.png',Yii::t('emoticon','Surprised')),'',
					array('class'=>'twipsify','title'=>':O','data-emoticon'=>':O')); ?>
		</div>
	</div>
</div>